Update to rust 2015-03-22
authorTamir Duberstein <tamird@gmail.com>
Sun, 22 Mar 2015 23:58:11 +0000 (16:58 -0700)
committerTamir Duberstein <tamird@gmail.com>
Mon, 23 Mar 2015 20:59:59 +0000 (13:59 -0700)
17 files changed:
Cargo.lock
Makefile.in
src/bin/cargo.rs
src/cargo/util/lev_distance.rs
src/rustversion.txt
src/snapshots.txt
tests/support/mod.rs
tests/test_cargo_bench.rs
tests/test_cargo_build_auth.rs
tests/test_cargo_compile.rs
tests/test_cargo_compile_custom_build.rs
tests/test_cargo_compile_git_deps.rs
tests/test_cargo_compile_plugins.rs
tests/test_cargo_cross_compile.rs
tests/test_cargo_publish.rs
tests/test_cargo_test.rs
tests/tests.rs

index 1a92674f03acf21babee0e4d3007e1abfc3234df..29c5d503c6bbf0075aa1b100959ddf888a851128 100644 (file)
@@ -3,26 +3,26 @@ name = "cargo"
 version = "0.1.0"
 dependencies = [
  "advapi32-sys 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "curl 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "docopt 0.6.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "env_logger 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "docopt 0.6.52 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "flate2 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "git2-curl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
  "kernel32-sys 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "registry 0.1.0",
- "rustc-serialize 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "semver 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "tar 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "tempdir 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "term 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tar 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tempdir 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "threadpool 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "time 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "time 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -43,7 +43,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "curl"
-version = "0.2.2"
+version = "0.2.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "curl-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -65,20 +65,20 @@ dependencies = [
 
 [[package]]
 name = "docopt"
-version = "0.6.51"
+version = "0.6.52"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "env_logger"
-version = "0.2.2"
+version = "0.2.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "log 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -93,17 +93,17 @@ dependencies = [
 
 [[package]]
 name = "gcc"
-version = "0.3.1"
+version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "git2"
-version = "0.2.3"
+version = "0.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -112,9 +112,9 @@ name = "git2-curl"
 version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "curl 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -143,11 +143,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "libgit2-sys"
-version = "0.2.4"
+version = "0.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libssh2-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "openssl-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -163,7 +163,7 @@ dependencies = [
 
 [[package]]
 name = "libssh2-sys"
-version = "0.1.12"
+version = "0.1.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -182,8 +182,11 @@ dependencies = [
 
 [[package]]
 name = "log"
-version = "0.2.5"
+version = "0.2.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
 name = "matches"
@@ -195,7 +198,7 @@ name = "miniz-sys"
 version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -204,7 +207,7 @@ name = "openssl-sys"
 version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "libressl-pnacl-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -222,11 +225,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "rand"
-version = "0.1.4"
+version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -238,13 +241,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 name = "registry"
 version = "0.1.0"
 dependencies = [
- "curl 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "rustc-serialize"
-version = "0.3.4"
+version = "0.3.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -254,20 +257,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "tar"
-version = "0.2.4"
+version = "0.2.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "tempdir"
-version = "0.3.0"
+version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "rand 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "term"
-version = "0.2.0"
+version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "kernel32-sys 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -281,10 +284,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "time"
-version = "0.1.20"
+version = "0.1.21"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "gcc 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gcc 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -293,7 +296,7 @@ name = "toml"
 version = "0.1.18"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "rustc-serialize 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -302,7 +305,7 @@ version = "0.2.27"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
index 1cc62e48e882409600aae9eb735f1934e324bfdc..caf383c9a652679c2b7010822d9d79132e8c6342 100644 (file)
@@ -57,7 +57,7 @@ define DIST_TARGET
 ifdef CFG_ENABLE_OPTIMIZE
 TARGET_$(1) = $$(TARGET_ROOT)/$(1)/release
 else
-TARGET_$(1) = $$(TARGET_ROOT)/$(1)
+TARGET_$(1) = $$(TARGET_ROOT)/$(1)/debug
 endif
 DISTDIR_$(1) = $$(TARGET_$(1))/dist
 IMGDIR_$(1) = $$(DISTDIR_$(1))/$$(PKG_NAME)-$(1)-image
index 0ad3a53c2d86e58a06434411c04605e14b36ed0b..f03446362e09d28cdf6817c28ee198239d819de5 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(core, io, std_misc, exit_status)]
+#![feature(core, exit_status, fs_ext)]
 
 extern crate "git2-curl" as git2_curl;
 extern crate "rustc-serialize" as rustc_serialize;
@@ -191,7 +191,7 @@ fn execute_subcommand(cmd: &str, args: &[String], shell: &mut MultiShell) {
                 }
             }
         }
-        Err(ref e) if e.kind() == io::ErrorKind::FileNotFound => {
+        Err(ref e) if e.kind() == io::ErrorKind::NotFound => {
             handle_error(CliError::new("No such subcommand", 127), shell)
         }
         Err(err) => {
index 1bb7d8e305af2fe10efb9f89fed807a8e1a0b56a..4ae55a9ebc70a6822a33efdbb56fee871bf0b792 100644 (file)
@@ -14,7 +14,7 @@ pub fn lev_distance(me: &str, t: &str) -> usize {
     if me.is_empty() { return t.chars().count(); }
     if t.is_empty() { return me.chars().count(); }
 
-    let mut dcol = range(0, t.len() + 1).collect::<Vec<_>>();
+    let mut dcol = (0..t.len() + 1).collect::<Vec<_>>();
     let mut t_last = 0;
 
     for (i, sc) in me.chars().enumerate() {
@@ -45,7 +45,7 @@ pub fn lev_distance(me: &str, t: &str) -> usize {
 fn test_lev_distance() {
     use std::char::{ from_u32, MAX };
     // Test bytelength agnosticity
-    for c in range(0u32, MAX as u32)
+    for c in (0u32..MAX as u32)
              .filter_map(|i| from_u32(i))
              .map(|i| i.to_string()) {
         assert_eq!(lev_distance(&c, &c), 0);
index cadd5e2ca06a04d0df3074516a21017d69d497b0..4b542348b32074b37ad7234c6763ad3b81f9b663 100644 (file)
@@ -1 +1 @@
-2015-03-14
+2015-03-22
index 5b78f0a8cd98994ebd9468c671d29ec9a3b50f2d..ee4469eca5838ff2806933503ef032943d96782c 100644 (file)
@@ -1,3 +1,11 @@
+2015-03-17
+  linux-i386 96a64fa9b4b6cc0cddaa90ecde4e08254c9025d5
+  linux-x86_64 354bb5b11b1f19e270ebc0553db1ddc560999bdb
+  macos-i386 d1b69ef765bc450a3758b8abdb0909df7893058b
+  macos-x86_64 a2328a82e073c230cd88dcfac96bdc784a999200
+  winnt-i386 fb6e346d59bda47ed87e36800e8bfe210cf01297
+  winnt-x86_64 4ef3d1ce315df8b27bd842fb66b8e2b03ce99a08
+
 2015-02-26
   linux-i386 2a28b604d09b4a76a54a05d91f7f158692427b3a
   linux-x86_64 7367f4aca86d38e209ef7236b00175df036c03e2
index a225ee68aeef923243b10484371436236380346e..5d347c4556c6d6eeabc5d9a8f65cffcc3c3e2ef8 100644 (file)
@@ -251,7 +251,7 @@ pub fn cargo_dir() -> PathBuf {
  */
 
 #[derive(Clone)]
-struct Execs {
+pub struct Execs {
     expect_stdout: Option<String>,
     expect_stdin: Option<String>,
     expect_stderr: Option<String>,
@@ -436,7 +436,7 @@ pub fn execs() -> Execs {
 }
 
 #[derive(Clone)]
-struct ShellWrites {
+pub struct ShellWrites {
     expected: String
 }
 
index 071d44d8aae1d9d38303c43f64b0f8f725c0eed9..02e300f3291e915db8258350e5fa12b315ef97e8 100644 (file)
@@ -468,7 +468,7 @@ test!(cargo_bench_twice {
 
     p.cargo_process("build");
 
-    for _ in range(0, 2) {
+    for _ in 0..2 {
         assert_that(p.cargo("bench"),
                     execs().with_status(0));
     }
index da306c1a5f71f9792123765e46ee73ee6efab7eb..ef3a940efb229dcfb987471069a84460b47b8eee 100644 (file)
@@ -15,7 +15,7 @@ fn setup() {
 // Test that HTTP auth is offered from `credential.helper`
 test!(http_auth_offered {
     let a = TcpListener::bind("127.0.0.1:0").unwrap();
-    let addr = a.socket_addr().unwrap();
+    let addr = a.local_addr().unwrap();
 
     fn headers(rdr: &mut BufRead) -> HashSet<String> {
         let valid = ["GET", "Authorization", "Accept", "User-Agent"];
@@ -116,7 +116,7 @@ Caused by:
 // Boy, sure would be nice to have a TLS implementation in rust!
 test!(https_something_happens {
     let a = TcpListener::bind("127.0.0.1:0").unwrap();
-    let addr = a.socket_addr().unwrap();
+    let addr = a.local_addr().unwrap();
     let t = thread::spawn(move|| {
         drop(a.accept().unwrap());
     });
@@ -163,7 +163,7 @@ Caused by:
 // Boy, sure would be nice to have an SSH implementation in rust!
 test!(ssh_something_happens {
     let a = TcpListener::bind("127.0.0.1:0").unwrap();
-    let addr = a.socket_addr().unwrap();
+    let addr = a.local_addr().unwrap();
     let t = thread::spawn(move|| {
         drop(a.accept().unwrap());
     });
index b3fc84c1a16d90f54c6e30f28af89f95363b66c8..8cd2466d907f32bf0ffb9cf699bb1ac34ae1cfcf 100644 (file)
@@ -1298,6 +1298,7 @@ test!(rebuild_preserves_out_dir {
         .file("build.rs", r#"
             use std::env;
             use std::old_io::File;
+            use std::old_path::{Path, GenericPath};
 
             fn main() {
                 let path = Path::new(env::var("OUT_DIR").unwrap()).join("foo");
index 20b4557ef2e694200a871276a7a3b550233f4ccf..6ed0bef4ed274e3421c5a0845e09a744127bcdc6 100644 (file)
@@ -783,6 +783,7 @@ test!(out_dir_is_preserved {
         .file("build.rs", r#"
             use std::env;
             use std::old_io::File;
+            use std::old_path::{Path, GenericPath};
             fn main() {
                 let out = env::var("OUT_DIR").unwrap();
                 File::create(&Path::new(out).join("foo")).unwrap();
@@ -888,7 +889,8 @@ test!(code_generation {
         "#)
         .file("build.rs", r#"
             use std::env;
-            use std::old_io::File;
+            use std::old_io::{File, Writer};
+            use std::old_path::{Path, GenericPath};
 
             fn main() {
                 let dst = Path::new(env::var("OUT_DIR").unwrap());
@@ -1052,7 +1054,8 @@ test!(test_a_lib_with_a_build_command {
         "#)
         .file("build.rs", r#"
             use std::env;
-            use std::old_io::File;
+            use std::old_io::{File, Writer};
+            use std::old_path::{Path, GenericPath};
 
             fn main() {
                 let out = Path::new(env::var("OUT_DIR").unwrap());
@@ -1143,6 +1146,7 @@ test!(build_script_with_dynamic_native_dependency {
         "#)
         .file("bar/build.rs", r#"
             use std::env;
+            use std::old_path::{Path, GenericPath};
 
             fn main() {
                 let src = Path::new(env::var("SRC").unwrap());
index cae0dcaddfd9968daa86e2d23b636ed82e67746f..0610f122cd5fc9892e756b8c24cff3683c0c95d0 100644 (file)
@@ -1257,6 +1257,7 @@ test!(git_dep_build_cmd {
         "#)
         .file("bar/build.rs", r#"
             use std::old_io::fs;
+            use std::old_path::{Path, GenericPath};
             fn main() {
                 fs::copy(&Path::new("src/bar.rs.in"),
                          &Path::new("src/bar.rs")).unwrap();
index b983e2cfbdc33d5d802558d3cfa53da1dcd67b7c..97d897f03ba3e6895e0bec2bb23b69d9bfa53884 100644 (file)
@@ -139,6 +139,7 @@ test!(plugin_with_dynamic_native_dependency {
         "#)
         .file("bar/build.rs", r#"
             use std::old_io::fs;
+            use std::old_path::{Path, GenericPath};
             use std::os;
 
             fn main() {
index 7f75ed34ef12b4fa22e0d7948d54f7ad75c4c915..81a4e81ed02cb6be7500ad03ffb7c5ee80d04295 100644 (file)
@@ -455,6 +455,7 @@ test!(cross_with_a_build_script {
         "#)
         .file("build.rs", format!(r#"
             use std::env;
+            use std::old_path::{{Path, GenericPath}};
             fn main() {{
                 assert_eq!(env::var("TARGET").unwrap().as_slice(), "{0}");
                 let mut path = Path::new(env::var("OUT_DIR").unwrap());
index f52b38a3d8e73dc8958ab23caa4c94fb06f2c77d..55eef734d9902e6e87fc0477644933273b92f041 100644 (file)
@@ -73,7 +73,7 @@ test!(simple {
 
     // Verify the tarball
     let mut rdr = GzDecoder::new(f).unwrap();
-    assert_eq!(rdr.header().filename(), Some(b"foo-0.0.1.crate"));
+    assert_eq!(rdr.header().filename().unwrap(), "foo-0.0.1.crate".as_bytes());
     let mut contents = Vec::new();
     rdr.read_to_end(&mut contents).unwrap();
     let inner = Cursor::new(contents);
index bde0542dc5ee6ee1f6592d3cbf0b830e9f989905..88d2a47cb45dcb4f58ab7d4e06af5ce3413a8750 100644 (file)
@@ -465,7 +465,7 @@ test!(cargo_test_twice {
 
     p.cargo_process("build");
 
-    for _ in range(0, 2) {
+    for _ in 0..2 {
         assert_that(p.cargo("test"),
                     execs().with_status(0));
     }
index f5c790ba45842eee974dfb1ca4920d2098d38d55..9d26721f6c53d864bba97fa5d343e03ac0d0c9bc 100644 (file)
@@ -1,5 +1,5 @@
 #![feature(core, io, old_io)]
-#![feature(std_misc, io, fs, net, path_ext, fs_time, fs_walk)]
+#![feature(std_misc, io, fs, fs_ext, path_ext, fs_time, fs_walk)]
 
 extern crate "rustc-serialize" as serialize;
 extern crate cargo;